package org.hamster.multidropbox.dropbox.command
{
	import org.hamster.multidropbox.dropbox.event.AppDropboxEvent;
	import org.hamster.multidropbox.dropbox.model.DropboxClientListProxy;
	import org.hamster.multidropbox.dropbox.model.DropboxClientProxy;
	import org.hamster.multidropbox.dropbox.model.DropboxConfigProxy;
	import org.hamster.multidropbox.dropbox.model.DropboxLinkFoldersProxy;
	import org.hamster.multidropbox.dropbox.model.DropboxStorageProxy;
	import org.puremvc.as3.interfaces.INotification;
	import org.puremvc.as3.patterns.command.SimpleCommand;
	
	public class DropboxDisposeCommand extends SimpleCommand
	{
		public function DropboxDisposeCommand()
		{
			super();
		}
		
		override public function execute(notification:INotification):void
		{
			facade.removeCommand(AppDropboxEvent.DROPBOX_STORAGE_LOAD_REQUEST);
			facade.removeCommand(AppDropboxEvent.DROPBOX_STORAGE_SAVE_REQUEST);
			facade.removeCommand(AppDropboxEvent.DROPBOX_LINK_FOLDERS_REQUEST);
			
			facade.removeProxy(DropboxClientProxy.NAME);
			facade.removeProxy(DropboxConfigProxy.NAME);
			facade.removeProxy(DropboxClientListProxy.NAME);
			facade.removeProxy(DropboxStorageProxy.NAME);
			facade.removeProxy(DropboxLinkFoldersProxy.NAME);
		}
	}
}